package projet;

public class Twitt {
	private String topic;
	private Opinion opinion;
	private String text;
	
	public Twitt(String topic, String opinion, String text) {
		super();
		this.topic = topic;
		
		this.text = text;
		if(opinion.equalsIgnoreCase("positive")){
			this.opinion=Opinion.POSITIVE;
		} else
		if(opinion.equalsIgnoreCase("negative")){
			this.opinion=Opinion.NEGATIVE;
		} else
		if(opinion.equalsIgnoreCase("neutral")){
			this.opinion=Opinion.NEUTRAL;
		} else
		if(opinion.equalsIgnoreCase("irrelevant")){
			this.opinion=Opinion.IRRELEVANT;
		}
	}
	
	public enum Opinion {
		POSITIVE, NEGATIVE, NEUTRAL, IRRELEVANT
	}

	/**
	 * @return the topic
	 */
	public String getTopic() {
		return topic;
	}

	/**
	 * @return the opinion
	 */
	public Opinion getOpinion() {
		return opinion;
	}

	/**
	 * @return the text
	 */
	public String getText() {
		return text;
	}
	
	
}
